EXCEL VBA Programming By Examples: Programming For Complete Beginners, Step-By-Step Illustrated Guide to Mastering Excel VBA by Tran Thanh

EXCEL VBA Programming By Examples: Programming For Complete Beginners, Step-By-Step Illustrated Guide to Mastering Excel VBA by Tran Thanh

Author:Tran, Thanh [Tran, Thanh]
Language: eng
Format: azw3, epub
Published: 2019-04-29T16:00:00+00:00


Note: Dates are in US Format. Months first, Days Second. This type of format depends on your windows regional settings.

Place a command button on your worksheet and add the following code lines:

3. Declare the variable i of type Integer.

Dim i As Integer

4. Add a For Next loop.

For i = 1 To 5

Next i

5. The Date function returns the current date without the time. Add the following code line to the loop, to highlight all the cells containing the current date (12/22/2013).

If Cells(i, 1).Value = Date Then Cells(i, 1).Font.Color = vbRed

Result:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.